package com.lin.cms.domain;

import java.io.Serializable;

public class File implements Serializable {

	private static final long serialVersionUID = 1L;

	private String filePath;

	private String fileName;

	private Boolean fileIsvalid;

	private int contentId;

	public File() {
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	
	public Boolean getFileIsvalid() {
		return fileIsvalid;
	}

	public void setFileIsvalid(Boolean fileIsvalid) {
		this.fileIsvalid = fileIsvalid;
	}

	public int getContentId() {
		return contentId;
	}

	public void setContentId(int contentId) {
		this.contentId = contentId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((filePath == null) ? 0 : filePath.hashCode());

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final File other = (File) obj;
		if (filePath == null) {
			if (other.filePath != null)
				return false;
		} else if (!filePath.equals(other.filePath))
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"filePath=" + "'" + filePath + "'" + 
			")";
	}
	
}
